<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>plugins.pluginclass.Plugin</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://openttd-python.googlecode.com">OpenTTD-Python</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="plugins-module.html">Package&nbsp;plugins</a> ::
        <a href="plugins.pluginclass-module.html">Module&nbsp;pluginclass</a> ::
        Class&nbsp;Plugin
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="plugins.pluginclass.Plugin-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Plugin</h1><p class="nomargin-top"><span class="codelink"><a href="plugins.pluginclass-pysrc.html#Plugin">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">Plugin</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
      <ul class="subclass-list">
<li><a href="plugins.webserver.StatsWriter-class.html">webserver.StatsWriter</a></li><li>, <a href="plugins.webserver.WebServer-class.html">webserver.WebServer</a></li><li>, <a href="plugins.sample.Sample-class.html">sample.Sample</a></li><li>, <a href="plugins.timewarning.TimeWarning-class.html">timewarning.TimeWarning</a></li><li>, <a href="plugins.stats.StatsWriter-class.html">stats.StatsWriter</a></li><li>, <a href="plugins.stats.WebServer-class.html">stats.WebServer</a></li><li>, <a href="plugins.rcon.RconPlugin-class.html">rcon.RconPlugin</a></li>  </ul>
</dd></dl>

<hr />
<p>The Plugin class, all plugins should be subclassed from this. It also 
  provides an interface.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="plugins.pluginclass.Plugin-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">parentclient</span>=<span class="summary-sig-default">None</span>)</span><br />
      plugin constructor, please do not overwrite, but use init.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="plugins.pluginclass-pysrc.html#Plugin.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">boolean</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="plugins.pluginclass.Plugin-class.html#registerCallback" class="summary-sig-name">registerCallback</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">type</span>,
        <span class="summary-sig-arg">callback</span>)</span><br />
      Method to register a callback.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="plugins.pluginclass-pysrc.html#Plugin.registerCallback">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">boolean</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="plugins.pluginclass.Plugin-class.html#registerChatCommand" class="summary-sig-name">registerChatCommand</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">command</span>,
        <span class="summary-sig-arg">callback</span>)</span><br />
      Method to register a chatcommand.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="plugins.pluginclass-pysrc.html#Plugin.registerChatCommand">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">boolean</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="plugins.pluginclass.Plugin-class.html#registerEventDispatcher" class="summary-sig-name">registerEventDispatcher</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">toevent</span>,
        <span class="summary-sig-arg">callback</span>)</span><br />
      Method to add an event dispatcher.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="plugins.pluginclass-pysrc.html#Plugin.registerEventDispatcher">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="unregisterAllCallbacks"></a><span class="summary-sig-name">unregisterAllCallbacks</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Method to unregister all callbacks.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="plugins.pluginclass-pysrc.html#Plugin.unregisterAllCallbacks">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="unregisterAllChatCommands"></a><span class="summary-sig-name">unregisterAllChatCommands</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Method to unregister all chatcommands.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="plugins.pluginclass-pysrc.html#Plugin.unregisterAllChatCommands">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="unregisterAllEventDispatchers"></a><span class="summary-sig-name">unregisterAllEventDispatchers</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Method to unregister all event dispatchers</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="plugins.pluginclass-pysrc.html#Plugin.unregisterAllEventDispatchers">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">Boolean</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="plugins.pluginclass.Plugin-class.html#unregisterCallback" class="summary-sig-name">unregisterCallback</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">type</span>,
        <span class="summary-sig-arg">callback</span>)</span><br />
      Method to unregister a callback.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="plugins.pluginclass-pysrc.html#Plugin.unregisterCallback">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">boolean</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="plugins.pluginclass.Plugin-class.html#unregisterChatCommand" class="summary-sig-name">unregisterChatCommand</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">command</span>)</span><br />
      Method to register a chatcommand.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="plugins.pluginclass-pysrc.html#Plugin.unregisterChatCommand">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">boolean</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="plugins.pluginclass.Plugin-class.html#unregisterEventDispatcher" class="summary-sig-name">unregisterEventDispatcher</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">toevent</span>,
        <span class="summary-sig-arg">callback</span>)</span><br />
      Method to remove an event dispatcher.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="plugins.pluginclass-pysrc.html#Plugin.unregisterEventDispatcher">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="unregisterEveryThing"></a><span class="summary-sig-name">unregisterEveryThing</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Method to unregister everything that was ever registered by the 
      plugin</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="plugins.pluginclass-pysrc.html#Plugin.unregisterEveryThing">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__format__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__sizeof__</code>,
      <code>__str__</code>,
      <code>__subclasshook__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== INSTANCE VARIABLES ==================== -->
<a name="section-InstanceVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">dict</span>
    </td><td class="summary">
        <a name="callbacks"></a><span class="summary-name">callbacks</span> = <code title="{}"><code class="variable-group">{</code><code class="variable-group">}</code></code><br />
      All callbacks registered by the plugin.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">dict</span>
    </td><td class="summary">
        <a name="commands"></a><span class="summary-name">commands</span> = <code title="{}"><code class="variable-group">{</code><code class="variable-group">}</code></code><br />
      All chatcommands registered by the plugin
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">dict</span>
    </td><td class="summary">
        <a name="dispatchers"></a><span class="summary-name">dispatchers</span> = <code title="{}"><code class="variable-group">{</code><code class="variable-group">}</code></code><br />
      All dispatchers registered by the plugin
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">parentclient</span>=<span class="sig-default">None</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="plugins.pluginclass-pysrc.html#Plugin.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>plugin constructor, please do not overwrite, but use init.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>parentclient</code></strong> (SpectatorClient class instance) - the client that is using the plugin</li>
    </ul></dd>
    <dt>Overrides:
        object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="registerCallback"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">registerCallback</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">type</span>,
        <span class="sig-arg">callback</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="plugins.pluginclass-pysrc.html#Plugin.registerCallback">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Method to register a callback. The callbacks are documented in 
  README.txt.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>type</code></strong> (string) - the callback type. I.e. on_mainloop</li>
        <li><strong class="pname"><code>callback</code></strong> (function) - The callback</li>
    </ul></dd>
    <dt>Returns: boolean</dt>
        <dd>True if the callback was added</dd>
  </dl>
<div class="fields">      <p><strong>Precondition:</strong>
        plugin.client must not be none
      </p>
</div></td></tr></table>
</div>
<a name="registerChatCommand"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">registerChatCommand</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">command</span>,
        <span class="sig-arg">callback</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="plugins.pluginclass-pysrc.html#Plugin.registerChatCommand">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Method to register a chatcommand.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>command</code></strong> (string) - the command name</li>
        <li><strong class="pname"><code>callback</code></strong> (function) - The callback</li>
    </ul></dd>
    <dt>Returns: boolean</dt>
        <dd>True if it was added</dd>
  </dl>
<div class="fields">      <strong>Preconditions:</strong>
      <ul class="nomargin-top">
        <li>
        plugin.client must not be none
        </li>
        <li>
        the command must not already be registered
        </li>
      </ul>
</div></td></tr></table>
</div>
<a name="registerEventDispatcher"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">registerEventDispatcher</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">toevent</span>,
        <span class="sig-arg">callback</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="plugins.pluginclass-pysrc.html#Plugin.registerEventDispatcher">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Method to add an event dispatcher. Event dispatchers are called when 
  an event is received.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>toevent</code></strong> (Event-derived class) - The class where the dispatcher should be added to</li>
        <li><strong class="pname"><code>callback</code></strong> (function) - The callback</li>
    </ul></dd>
    <dt>Returns: boolean</dt>
        <dd>True if it was registered</dd>
  </dl>
<div class="fields">      <p><strong>Precondition:</strong>
        the callback must not already be registered
      </p>
</div></td></tr></table>
</div>
<a name="unregisterCallback"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">unregisterCallback</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">type</span>,
        <span class="sig-arg">callback</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="plugins.pluginclass-pysrc.html#Plugin.unregisterCallback">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Method to unregister a callback. The callbacks are documented in 
  README.txt</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>type</code></strong> (string) - the callback type. I.e. on_mainloop</li>
        <li><strong class="pname"><code>callback</code></strong> (function) - The callback</li>
    </ul></dd>
    <dt>Returns: Boolean</dt>
        <dd>True if it was unregistered</dd>
  </dl>
<div class="fields">      <strong>Preconditions:</strong>
      <ul class="nomargin-top">
        <li>
        plugin.client must not be none
        </li>
        <li>
        the callback must be registered
        </li>
      </ul>
</div></td></tr></table>
</div>
<a name="unregisterChatCommand"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">unregisterChatCommand</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">command</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="plugins.pluginclass-pysrc.html#Plugin.unregisterChatCommand">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Method to register a chatcommand.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>command</code></strong> (string) - the command name</li>
    </ul></dd>
    <dt>Returns: boolean</dt>
        <dd>True if it was removed</dd>
  </dl>
<div class="fields">      <strong>Preconditions:</strong>
      <ul class="nomargin-top">
        <li>
        plugin.client must not be none
        </li>
        <li>
        the command must be registered
        </li>
      </ul>
</div></td></tr></table>
</div>
<a name="unregisterEventDispatcher"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">unregisterEventDispatcher</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">toevent</span>,
        <span class="sig-arg">callback</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="plugins.pluginclass-pysrc.html#Plugin.unregisterEventDispatcher">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Method to remove an event dispatcher.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>toevent</code></strong> (Event-derived class) - The class where the dispatcher should be added to</li>
        <li><strong class="pname"><code>callback</code></strong> (function) - The callback</li>
    </ul></dd>
    <dt>Returns: boolean</dt>
        <dd>True if it was unregistered</dd>
  </dl>
<div class="fields">      <p><strong>Precondition:</strong>
        the callback must be registered
      </p>
</div></td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://openttd-python.googlecode.com">OpenTTD-Python</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Mon Oct 20 13:03:11 2008
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
